home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-02-07 | 1.5 KB | 69 lines | [TEXT/MPS ] |
- (*
- videoVersion() -- Return the current version of the video XCMDs.
-
- To compile and link this file using Macintosh Programmer's Workshop,
-
- pascal -w videoVersion.p
-
- link -m ENTRYPOINT -o HyperCommands -rt XFCN=8005 -sn Main=videoVersion ∂
- videoVersion.p.o "{MPW}"Libraries:interface.o "{MPW}"PLibraries:PasLib.o
-
- Copyright © 1987,88 Apple Computer, Inc.
-
- 9/87 - Initial coding by Harry R. Chesley.
- 2/88 - Changed for new interface specification by Harry R. Chesley.
- *)
-
- {$R-}
-
- {$S videoVersion } { Segment name must be the same as the command name. }
-
- unit DummyUnit;
-
- interface
-
- uses MemTypes, QuickDraw, OSIntf, HyperXCmd;
-
- procedure EntryPoint(paramPtr: XCmdPtr);
-
- implementation
-
- type
-
- Str31 = String[31];
-
- procedure videoVersion(paramPtr: XCmdPtr); forward;
-
- procedure EntryPoint(paramPtr: XCmdPtr);
-
- begin
- videoVersion(paramPtr);
- end;
-
- procedure videoVersion(paramPtr: XCmdPtr);
-
- {$I XCmdGlue.inc}
-
- var versionStr: str255;
-
- procedure Fail(errMsg: Str255); { set theResult and quit }
- begin
- paramPtr^.returnValue := PasToZero(errMsg);
- exit(videoVersion);
- end;
-
- {$I VideoUtil.inc}
-
- begin
- if paramPtr^.paramCount <> 0 then Fail('parameter count is not 0');
-
- { Get the selected driver version. }
- versionStr := videoFunc('version','');
- { Or "noPlayer" if there is no selected driver. }
- if versionStr = '' then versionStr := 'noPlayer';
- { Return the toolkit version and the player driver version. }
- paramPtr^.returnValue := PasToZero(Concat('Video Toolkit 2.0,',versionStr))
- end;
-
- end.
-